package com.jt.www.domain.enums.common;

/**
 * Created by shaoyn on 2020/04/21.
 */

/**
 * 是否枚举
 * Y-是；N-否
 */
public enum YesOrNoEnum {

    YES("Y", "是"),
    NO("N", "否");

    private String type;
    private String desc;

    YesOrNoEnum(String type, String desc) {
        this.type = type;
        this.desc = desc;
    }

    public static boolean yes(String type) {
        if (YES.type.equals(type)) {
            return true;
        }
        return false;
    }

    public static boolean no(String type) {
        return !yes(type);
    }


    public String getType() {
        return type;
    }

    public String getDesc() {
        return desc;
    }
}